{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import cirq\n",
    "from cirq.contrib.svg import SVGCircuit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a, b, c = cirq.LineQubit.range(3)\n",
    "SVGCircuit(cirq.Circuit(\n",
    "    cirq.CNOT(a, b),\n",
    "    cirq.CZ(b, c),\n",
    "    cirq.SWAP(a, c),\n",
    "    cirq.PhasedXPowGate(exponent=0.123, phase_exponent=0.456).on(c),\n",
    "    cirq.Z(a),\n",
    "    cirq.measure(a, b, c, key='z')\n",
    "))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "SVGCircuit(cirq.Circuit(\n",
    "    cirq.CNOT(cirq.GridQubit(0,0), cirq.GridQubit(0,1)),\n",
    "    cirq.CNOT(cirq.GridQubit(1,0), cirq.GridQubit(1,1)),\n",
    "    cirq.CNOT(cirq.GridQubit(0,0), cirq.GridQubit(1,0)),\n",
    "    cirq.CNOT(cirq.GridQubit(0,1), cirq.GridQubit(1,1)),\n",
    "    cirq.CNOT(cirq.GridQubit(0,0), cirq.GridQubit(0,1)),\n",
    "    cirq.CNOT(cirq.GridQubit(1,0), cirq.GridQubit(1,1)),\n",
    "    cirq.CNOT(cirq.GridQubit(0,0), cirq.GridQubit(1,0)),\n",
    "    cirq.CNOT(cirq.GridQubit(0,1), cirq.GridQubit(1,1)),\n",
    "))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
